Skip to content

Use first public parent for unresolvable Phabricator bases - #6828

Merged
olliehcrook merged 3 commits into
mozilla:masterfrom
olliehcrook:issue-6792-first-public-parent
Sep 24, 2026
Merged

olliehcrook merged 3 commits into
mozilla:masterfrom
olliehcrook:issue-6792-first-public-parent

Conversation

@olliehcrook

@olliehcrook olliehcrook commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6792 after moz-phab patch is rolled out.
Safe to add before - falls back to previous behaviour if first public commit is not present.

related:

@olliehcrook
olliehcrook marked this pull request as ready for review September 14, 2026 10:20
@olliehcrook
olliehcrook requested a review from a team as a code owner September 14, 2026 10:21
@olliehcrook
olliehcrook force-pushed the issue-6792-first-public-parent branch from 441e56f to 3a2a2a6 Compare September 18, 2026 13:41

@suhaibmujahid suhaibmujahid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM, just left some minor comments.

Comment thread libs/phabricator-client/phabricator_client/models.py Outdated
Comment thread libs/phabricator-client/phabricator_client/models.py
Comment thread libs/phabricator-client/phabricator_client/models.py
Comment thread libs/phabricator-client/phabricator_client/models.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The fallback preserves existing behavior when metadata is absent and is adequately covered by focused tests.

Review effort: Balanced
Findings: None

What changed in this PR

Adds recovery for Phabricator revisions whose recorded base commit cannot be resolved.

Changes:

  • Exposes firstPublicParent from diff metadata.
  • Falls back to that parent when base resolution fails.
  • Adds client and runtime coverage.
File Description
libs/​phabricator-client/​phabricator_client/​models.py Exposes first public parent metadata.
libs/​phabricator-client/​tests/​test_client.py Tests metadata extraction.
libs/​hackbot-runtime/​hackbot_runtime/​revision.py Adds base-resolution fallback.
libs/​hackbot-runtime/​tests/​test_revision.py Tests fallback behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@olliehcrook
olliehcrook merged commit 89899c6 into mozilla:master Sep 24, 2026
8 checks passed
@olliehcrook
olliehcrook deleted the issue-6792-first-public-parent branch September 24, 2026 14:21
@suhaibmujahid suhaibmujahid changed the title Use first public parent for unresolvable Phabricator bases (#6792) Use first public parent for unresolvable Phabricator bases Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing to checkout out a revision with an unknown base

3 participants